//
//  loversViewController.m
//  TinyFortune
//
//  Created by lc on 16/6/29.
//  Copyright © 2016年 lc. All rights reserved.
//

#import "loversViewController.h"

@interface loversViewController ()

@end

@implementation loversViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/
- (void)save{
    //提高用户交互的小菊花转
    [MBProgressHUD showHUDAddedTo:self.view animated:YES];
    MBProgressHUD *hud = [MBProgressHUD HUDForView:self.view];
    hud.labelText = @"保存";
    AVObject *obj = [[AVObject alloc]initWithClassName:@"lovers"];
    [obj setObject:self.text.text forKey:@"Id"];
    [obj setObject:[AVUser currentUser].mobilePhoneNumber forKey:@"myId"];
    [obj saveInBackgroundWithBlock:^(BOOL succeeded, NSError *error) {
        if (succeeded) {
            [hud hide:YES];
        }
    }];
    [self onClicked];
    
}
@end
